import Service from './$axios'
import { appName } from '../config';
// const appName = ''



// 试机指派查询[7]
export const findMachineAssignAll = (data) => {
    return Service({
        url: `${appName}/workOrder/findMachineAssignAll`,
        method: 'post',
        data: data
    })
}

// 试机指派[8]
export const addMachineAssign = (data) => {
    return Service({
        url: `${appName}/workOrder/addMachineAssign`,
        method: 'post',
        data: data
    })
}

// 查询试机报告[9]
export const findMachineReport = (data) => {
    return Service({
        url: `${appName}/workOrder/findMachineReport`,
        method: 'post',
        data: data
    })
}

// 修改试机报告[9]
export const updateMachineReport = (data) => {
    return Service({
        url: `${appName}/workOrder/updateMachineReport`,
        method: 'post',
        data: data
    })
}

// 查询试机模板[10]
export const findMachineTemplate = (data) => {
    return Service({
        url: `${appName}/workOrder/findMachineTemplate?${data}`,
        method: 'get'
    })
}

// 修改试机模板[11]
export const updateMachineTemplate = (data) => {
    return Service({
        url: `${appName}/workOrder/updateMachineTemplate`,
        method: 'post',
        data: data
    })
}


// 检验指派查询[13]
export const findCheckAssignAll = (data) => {
    return Service({
        url: `${appName}/workOrder/findCheckAssignAll`,
        method: 'post',
        data: data
    })
}

// 检验指派[14]
export const addCheckAssign = (data) => {
    return Service({
        url: `${appName}/workOrder/addCheckAssign`,
        method: 'post',
        data: data
    })
}

// 查询检验报告[15]
export const findCheckReport = (data) => {
    return Service({
        url: `${appName}/workOrder/findCheckReport`,
        method: 'post',
        data: data
    })
}

// 修改检验报告[16]
export const updateCheckReport = (data) => {
    return Service({
        url: `${appName}/workOrder/updateCheckReport`,
        method: 'post',
        data: data
    })
}

// 查询检验模板[17]
export const findCheckTemplate = (data) => {
    return Service({
        url: `${appName}/workOrder/findCheckTemplate?${data}`,
        method: 'get'
    })
}

// 修改检验模板[18]
export const updateCheckTemplate = (data) => {
    return Service({
        url: `${appName}/workOrder/updateCheckTemplate`,
        method: 'post',
        data: data
    })
}

// -------------- yyr --------------
// 查询试机管理
export const queryTestManage = (data) => {
    return Service({
        url: `${appName}/TestManage/queryTestManage?${data}`,
        method: 'get'
    })
}
// 查询个人列表
export const showUserList = () => {
    return Service({
        url: `${appName}/TestManage/showUserList`,
        method: 'get'
    })
}
// 查询班组列表
export const showGroupList = () => {
    return Service({
        url: `${appName}/TestManage/showGroupList`,
        method: 'get'
    })
}
// 指派
export const assignTestMachine = (data) => {
    return Service({
        url: `${appName}/TestManage/assignTestMachine`,
        method: 'post',
        data
    })
}
// 导出（试机管理）
export const exportTestMachineManageExcel = (data) => {
    return Service({
        url: `${appName}/TestManage/exportTestMachineManageExcel`,
        method: 'post',
        data: data,
        responseType: 'blob'
    })
}

// 导出(生产订单管理子表)
export const exportProductionOrderChildExcel = (data) => {
    return Service({
        url: `${appName}/TestManage/exportProductionOrderChildExcel`,
        method: 'post',
        data: data,
        responseType: 'blob'
    })
}
//  查询详情（某工序）
export const queryTestManageDetail = (data) => {
    return Service({
        url: `${appName}/TestManage/queryTestManageDetail?${data}`,
        method: 'get'
    })
}
// 导出（工序详情）
export const exportTestManageDetailExcel = (data) => {
    return Service({
        url: `${appName}/TestManage/exportTestManageDetailExcel`,
        method: 'post',
        data: data,
        responseType: 'blob'

    })
}